<%@ include file="common.jsp" %>

<hr/>
<div>
	<c:choose>
		<c:when test="${resultOfsearch}">
			<span class="errorMsg">
				No user found according to the selected criteria.
			</span>
		</c:when>
		<c:otherwise>
			<form name="userSubmit" id="userSubmit">
	  			<table class="viewDetails">
						<tr class="heading">
							<th>Select</th>
							<th>UserId</th> 
							<th>UserName</th> 
							<th>Business Unit</th>		<!-- changed from location to business unit on 25-02-2012 as told by shubh --> 
							<th>Department</th> 
						</tr>
	  				<c:forEach var="tab" items="${detailsList}" varStatus="loop">
	  				
	  					<c:set var="tabColor" value="odd"></c:set>
					    	<c:if test="${(loop.index % 2) eq 0}">
					        	<c:set var="tabColor" value="even"></c:set>
					        </c:if>
				        
						<tr class="${tabColor}">
							<td align="center"> <input type="radio" id="radio${index.index}" name="radio" value="${tab.username},${tab.userDisplayName},${tab.buId}, ${tab.deptId}, ${locName[tab.buId]}, ${deptName[tab.deptId]}"/> </td>
							<td align="center" id="userName${index.index}">${tab.username}</td> 
							<td align="center" id="userDisplayName${index.index}">${tab.userDisplayName}</td>
							<td align="center" id="location${index.index}">${locName[tab.buId]} </td> 
							<td align="center" id="department${index.index}">${deptName[tab.deptId]} </td> 
						</tr>
					</c:forEach>
				</table>
				<table style="width: 90%;">
					<tr class="formSpacingRow">
						<td></td>
					</tr>
					<tr style="width: 100%;">
						<td align="center" width="100%;">
							<input type="button" class="formButton" value="Select User" onclick="submitSearchUserDetails();" />
						</td>
					</tr>
				</table>
						
			</form>
		</c:otherwise>
	</c:choose>
</div>




 
